.class public Lcom/nemustech/regina/widgets/clock/WeatherData;
.super Ljava/lang/Object;
.source "WeatherData.java"

# interfaces
.implements Landroid/provider/BaseColumns;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;,
        Lcom/nemustech/regina/widgets/clock/WeatherData$CurrentCondition;
    }
.end annotation


# static fields
.field public static final AUTHORITY:Ljava/lang/String; = "com.nemustech.regina.weatherserver"

.field public static final CELSIUS:I = 0x1

.field public static final CITY_CODE:Ljava/lang/String; = "city_code"

.field public static final CONTENT_TYPE:Ljava/lang/String; = "vnd.nemustech.regina.cursor.dir/vnd.regina.weather"

.field public static final CONTENT_TYPE_ITEM:Ljava/lang/String; = "vnd.nemustech.regina.cursor.item/vnd.regina.weather"

.field public static final CONTENT_URI:Landroid/net/Uri; = null

.field public static final CUR_TEMP:Ljava/lang/String; = "cur_temp"

.field public static final CUR_WEATHER:Ljava/lang/String; = "cur_weather"

.field public static final FAHRENHEIT:I = 0x0

.field public static final FORECASTS_NUM:I = 0x5

.field public static final FORECAST_PREF:Ljava/lang/String; = "for"

.field public static final FORECAST_SUF_DATE:Ljava/lang/String; = "_date"

.field public static final FORECAST_SUF_TEMP_HIGH:Ljava/lang/String; = "_temp_high"

.field public static final FORECAST_SUF_TEMP_LOW:Ljava/lang/String; = "_temp_low"

.field public static final FORECAST_SUF_WEATHER:Ljava/lang/String; = "_weather"

.field public static final ID:Ljava/lang/String; = "_id"

.field public static final LAST_UPDATE:Ljava/lang/String; = "last_update"

.field public static final LOCATION:Ljava/lang/String; = "location"

.field public static final TEMP_UNITS:Ljava/lang/String; = "temp_units"


# instance fields
.field private mCityCode:Ljava/lang/String;

.field private mCurrentCondition:Lcom/nemustech/regina/widgets/clock/WeatherData$CurrentCondition;

.field private mForeCasts:[Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

.field private mLastUpdateTime:Ljava/lang/Long;

.field private mLocation:Ljava/lang/String;

.field private mUnitsForTemp:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 14
    const-string v0, "content://com.nemustech.regina.weatherserver/weather"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    sput-object v0, Lcom/nemustech/regina/widgets/clock/WeatherData;->CONTENT_URI:Landroid/net/Uri;

    return-void
.end method

.method public constructor <init>()V
    .locals 4

    .prologue
    const/4 v3, 0x5

    .line 41
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 42
    const-string v1, ""

    iput-object v1, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mCityCode:Ljava/lang/String;

    .line 43
    new-instance v1, Lcom/nemustech/regina/widgets/clock/WeatherData$CurrentCondition;

    invoke-direct {v1, p0}, Lcom/nemustech/regina/widgets/clock/WeatherData$CurrentCondition;-><init>(Lcom/nemustech/regina/widgets/clock/WeatherData;)V

    iput-object v1, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mCurrentCondition:Lcom/nemustech/regina/widgets/clock/WeatherData$CurrentCondition;

    .line 44
    new-array v1, v3, [Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

    iput-object v1, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mForeCasts:[Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

    .line 45
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    if-ge v0, v3, :cond_0

    .line 46
    iget-object v1, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mForeCasts:[Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

    new-instance v2, Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

    invoke-direct {v2, p0}, Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;-><init>(Lcom/nemustech/regina/widgets/clock/WeatherData;)V

    aput-object v2, v1, v0

    .line 45
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 48
    :cond_0
    return-void
.end method


# virtual methods
.method public getCode()Ljava/lang/String;
    .locals 1

    .prologue
    .line 51
    iget-object v0, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mCityCode:Ljava/lang/String;

    return-object v0
.end method

.method public getCurrentCondition()Lcom/nemustech/regina/widgets/clock/WeatherData$CurrentCondition;
    .locals 1

    .prologue
    .line 83
    iget-object v0, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mCurrentCondition:Lcom/nemustech/regina/widgets/clock/WeatherData$CurrentCondition;

    return-object v0
.end method

.method public getDesignatedDateForeCast(Ljava/lang/Long;)Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;
    .locals 3
    .parameter "designatedDate"

    .prologue
    .line 95
    const/4 v1, 0x0

    .line 97
    .local v1, returnVal:Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    const/4 v2, 0x5

    if-ge v0, v2, :cond_1

    .line 98
    iget-object v2, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mForeCasts:[Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

    aget-object v2, v2, v0

    invoke-virtual {v2}, Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;->getDate()Ljava/lang/Long;

    move-result-object v2

    if-ne v2, p1, :cond_0

    .line 99
    iget-object v2, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mForeCasts:[Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

    aget-object v1, v2, v0

    .line 97
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 101
    :cond_1
    return-object v1
.end method

.method public getForeCast(I)Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;
    .locals 1
    .parameter "index"

    .prologue
    .line 91
    iget-object v0, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mForeCasts:[Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

    aget-object v0, v0, p1

    return-object v0
.end method

.method public getForeCasts()[Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;
    .locals 1

    .prologue
    .line 87
    iget-object v0, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mForeCasts:[Lcom/nemustech/regina/widgets/clock/WeatherData$ForeCast;

    return-object v0
.end method

.method public getLastUpdateTime()Ljava/lang/Long;
    .locals 1

    .prologue
    .line 55
    iget-object v0, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mLastUpdateTime:Ljava/lang/Long;

    return-object v0
.end method

.method public getLocation()Ljava/lang/String;
    .locals 1

    .prologue
    .line 75
    iget-object v0, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mLocation:Ljava/lang/String;

    return-object v0
.end method

.method public getUnits()I
    .locals 1

    .prologue
    .line 71
    iget v0, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mUnitsForTemp:I

    return v0
.end method

.method public setCode(Ljava/lang/String;)V
    .locals 0
    .parameter "code"

    .prologue
    .line 63
    iput-object p1, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mCityCode:Ljava/lang/String;

    .line 64
    return-void
.end method

.method public setLastUpdateTime(Ljava/lang/Long;)Ljava/lang/Long;
    .locals 0
    .parameter "dateVal"

    .prologue
    .line 59
    iput-object p1, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mLastUpdateTime:Ljava/lang/Long;

    return-object p1
.end method

.method public setLocation(Ljava/lang/String;)V
    .locals 0
    .parameter "location"

    .prologue
    .line 79
    iput-object p1, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mLocation:Ljava/lang/String;

    .line 80
    return-void
.end method

.method public setUnits(I)V
    .locals 0
    .parameter "units"

    .prologue
    .line 67
    iput p1, p0, Lcom/nemustech/regina/widgets/clock/WeatherData;->mUnitsForTemp:I

    .line 68
    return-void
.end method
